package com.lost.octopus.es.processor.web.controller;

import com.lost.octopus.es.helper.entity.query.QueryResult;
import com.lost.octopus.es.processor.entity.Resident;
import com.lost.octopus.es.processor.entity.query.FindResident;
import com.lost.octopus.es.processor.feign.ResidentApi;
import com.lost.octopus.es.processor.resolver.EsShareListRequest;
import com.lost.octopus.es.processor.service.impl.ResidentService;
import com.lost.octopus.es.processor.web.controller.base.BaseServiceController;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 人员接口（tag-resident）
 * @author zhangbh
 */
@RestController
public class ResidentController extends BaseServiceController<ResidentService, Resident, Integer> implements ResidentApi {

    @Override
    @PostMapping(value = "searchList.do", name = "人员查询")
    public <Q extends FindResident> QueryResult<Resident> searchList(EsShareListRequest<Q> reqData) {
        return searchPage(reqData, Resident.class, "人员查询");
    }

}
